<!--
 * @Description: 网格布局
 * @Author: rendc
 * @Date: 2022-09-23 10:02:54
 * @LastEditors: rendc
 * @LastEditTime: 2022-09-23 10:26:37
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>网格布局</title>
  <style>
    body{ 
      margin: 0;
      padding: 0;
    }
    .main{ 
      width: 100wh;
      margin: 0 auto;
    }
    .row{ 
      overflow: hidden;
    }
    .col{ 
      border: 1px solid black;
      background-color: aqua;
      color: white;
      padding-left: 5px;
      padding-right: 5px;
      float: left;
      text-align: center;
      height: 30px;
      line-height: 30px;
      box-sizing: border-box;
      margin-bottom: 20px;
    }
    .col-1{ 
      width: calc(100% / 12);
    }
    .col-2{ 
      width: calc(100% / 6);
    }
    .col-3{ 
      width: calc(100% / 4);
    }
    .col-4{ 
      width: calc(100% / 3);
    }
    .col-5{ 
      width: calc(100% / 12 * 5);
    }
    .col-6{ 
      width: calc(100% / 2);
    }
    .col-7{ 
      width: calc(100% / 12 * 7);
    }
    .col-8{ 
      width: calc(100% / 12 * 8);
    }
    .col-9{ 
      width: calc(100% / 12 * 9);
    }
    .col-10{ 
      width: calc(100% / 12 * 10);
    }
    .col-11{ 
      width: calc(100% / 12 * 11);;
    }
    .col-12{ 
      width: 100%;
    }
    .menu,.main{ 
      height: 100vh;
    }
  </style>
</head>
<body>
  <div class="main">
    <div class="row">
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
      <div class="col col-1">col-1</div>
    </div>
    <div class="row">
      <div class="col col-2">col-2</div>
      <div class="col col-2">col-2</div>
      <div class="col col-2">col-2</div>
      <div class="col col-2">col-2</div>
      <div class="col col-2">col-2</div>
      <div class="col col-2">col-2</div>
    </div>
    <div class="row">
      <div class="col col-6">col-6</div>
      <div class="col col-6">col-6</div>
    </div>
    <div class="row">
      <div class="col col-6">col-6</div>
      <div class="col col-2">col-2</div>
      <div class="col col-2">col-2</div>
      <div class="col col-2">col-2</div>
    </div>
    <div class="row">
      <div class="col col-4">col-4</div>
      <div class="col col-8">col-8</div>
    </div>
    <div class="row">
      <div class="col col-12">col-12</div>
    </div>
    <div class="row">
      <div class="menu col col-3">
        <h1>目录</h1>
        <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
        <li>9</li>
        <li>0</li>
      </ul>
      </div>
      <div class="main col col-9">
        <h1> 内容区</h1>
      </div>
    </div>
  </div>
</body>
</html>